﻿<Window x:Class="WpfClient.SearchView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Search" Height="347" Width="616">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="71*" />
            <ColumnDefinition Width="129*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" MinHeight="30"/>
            <RowDefinition Height="Auto" MinHeight="30"/>
            <RowDefinition Height="Auto" MinHeight="50"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>

        <TextBlock Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" FontFamily="Segoe UI Semibold" FontSize="28">Search for Earthquake Event</TextBlock>

        <TextBlock Grid.Column="0" Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,10,0" FontSize="14">Location</TextBlock>
        <TextBox x:Name="locationTextBox" Grid.Column="1" Grid.Row="1" VerticalAlignment="Bottom" Height="18"  Width="250" HorizontalAlignment="Left"/>

        <TextBlock Grid.Column="0" Grid.Row="2" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,10,0" FontSize="14">Min Magnitude</TextBlock>
        <TextBox x:Name="minMagnitudeTextBox" Grid.Column="1" Grid.Row="2" VerticalAlignment="Bottom" Height="18" Width="120" HorizontalAlignment="Left" />

        <Button Grid.Column="1" Grid.Row="3" Content="Search" Height="30" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,10,0,10" Click="Button_Click_1" FontSize="16" IsDefault="True"/>

        <TextBlock Grid.Column="0" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" FontSize="18">Search Results</TextBlock>

        <ListBox x:Name="searchResultsListBox" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="2">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock>
                        <TextBlock.Text>
                            <MultiBinding StringFormat="{}{0} {1} {2}">
                                <Binding Path="Datetime" />
                                <Binding Path="Title" />
                                <Binding Path="Magnitude" />
                            </MultiBinding>
                        </TextBlock.Text>
                    </TextBlock>

                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

    </Grid>
</Window>
